<html>
    <head>
        <script type="text/javascript" src="qrcode.js"></script>
        <style type="text/css">
                #qrcode{
                    display:flex;
                    justify-content:center;
                    align-items:center;
                    margin-top:200px;
                }
        </style>
    </head>
    <body>
    <!-- <input type="text" id="valor" value=""> -->
    <!-- <button onClick="createQrCode()">Gerar QR Code</button> -->
        <div id="qrcode"></div>
    </body>
    <script>
        function createQrCode()
        {
            // var userInput = document.getElementById('valor').value;

            var qrcode = new QRCode("qrcode", {
                text: decodeURIComponent("http://" + window.location.href.split("?")[1].split("=")[1]),
                width: 256,
                height: 256,
                colorDark: "black",
                colorLight: "white",
                correctLevel : QRCode.CorrectLevel.H
            });
        }

        createQrCode()
    </script>
</html>